package com.LachesismStorm.lachesism.commonTools;

import com.LachesismStorm.lachesism.core.email.EmailUtil;
import com.LachesismStorm.lachesism.core.util.AsyncUtil;

import javax.annotation.Resource;

import static com.LachesismStorm.lachesism.core.util.LachesismTools.getTime;

/**
 * @Author lachesism
 * @Date 2024-12-26 17:57
 **/
public class sendEmailEveryComp {

    @Resource
    private EmailUtil emailUtil;

    public void main(String[] args) {
        AsyncUtil.executeAsync(() -> {
//            emailUtil.sendEmail("qq", "2595647320@qq.com", "一", "你好");
//            emailUtil.sendEmail("google", "2595647320@qq.com", "二", "你好");
//            emailUtil.sendEmail("netease", "2595647320@qq.com", "三", "你好");
//            emailUtil.sendHtmlEmail("qq", "2595647320@qq.com", "四", "emailTemplate/email_template2.html");
//            emailUtil.sendHtmlEmail("google", "2595647320@qq.com", "五", "emailTemplate/email_template2.html");
//            emailUtil.sendHtmlEmail("netease", "2595647320@qq.com", "六", "emailTemplate/email_template2.html");
//            emailUtil.sendEmailWithAttachment("qq", "2595647320@qq.com", "七", "你好", "/Users/yuno/Pictures/123.jpeg");
//            String imgUrl = "https://yunlang-bid-document-dev.oss-cn-shanghai.aliyuncs.com/image/lunar/html/" + getTime("yyyy-MM-dd") + ".png";
//            emailUtil.sendEmailWithAttachmentOnline("qq", "2595647320@qq.com", "七", "你好", imgUrl);
//            emailUtil.sendEmailWithAttachment("google", "2595647320@qq.com", "八", "你好", "/Users/yuno/Pictures/123.jpeg");
//            emailUtil.sendEmailWithAttachment("netease", "2595647320@qq.com", "九", "你好", "/Users/yuno/Pictures/123.jpeg");
        });
    }

}
